<?php
class SendSMS
{
	
    function SendSMS($mobile, $content,$TokenID)
    {
        //$TokenID
        //7103040130983487  纪梵希
        //7100203030727691  惠氏
        $url = 'http://www.wemediacn.net/webservice/smsservice.asmx/SendSMS?mobile='.$mobile.'&FormatID=8&Content='.urlencode($content).'&ScheduleDate=2010-1-1&TokenID='.$TokenID;
        $cu = curl_init();
        curl_setopt($cu, CURLOPT_URL, $url);
        curl_setopt($cu, CURLOPT_RETURNTRANSFER, 1);
        $ret = curl_exec($cu);
        curl_close($cu);

        if(strpos(strtolower($ret), 'ok') !== FALSE)
        {
            return TRUE;
        }
        else
        {
            return FALSE;
        }
        /*
        $ret返回如下：
        <?xml version="1.0" encoding="utf-8"?>
    <string xmlns="http://mms.wemediacn.com/">OK:[201405263018986871030401]</string>
        如果返回OK+msgid代表发送成功，如果返回不是OK代表发送失败

        */
    }
   
        
  
}
?>